#include <iostream>
#include <string>
using namespace std;
double compare(double a, double b)
{

    return a < b;
}
class compare2
{
public:
    double operator()(double a, double b)
    {
        return a < b;
    }
};
double test(double a, double b, double (*f)(double, double))
{
    return f(a, b);
}

int main(int argc, char const *argv[])
{
    double (*f)(double a, double b);
    f = compare;
    cout << f(1, 2) << endl;
    compare2 a;
    cout << compare2()(1, 2) << endl;
    cout << a(1, 2) << endl;
    cout << a.operator()(1, 2) << endl;
    auto f_2 = [](double a, double b) -> double
    { return a < b; };
    cout << f_2(2, 1) << endl;
    cout << test(1, 2, f) << endl;

    return 0;
}
